package cn.iocoder.yudao.module.measure.dal.dataobject.protocol;

import com.baomidou.mybatisplus.annotation.*;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.LinkedList;

import static com.baomidou.mybatisplus.annotation.SqlCondition.EQUAL;
import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 数据上传协议消息类型配置
 * </p>
 *
 * @author zhengbzh
 * @date 2025-05-23 11:39:49
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Accessors(chain = true)
@Builder
@TableName("template_device_upload_message")
public class TemplateDeviceUploadMessage  implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.INPUT)
    protected Long id;

    @TableField(value = "created_time", fill = FieldFill.INSERT)
    protected LocalDateTime createdTime;

    @TableField(value = "created_by", fill = FieldFill.INSERT)
    protected Long createdBy;

    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    protected LocalDateTime updatedTime;

    @TableField(value = "updated_by", fill = FieldFill.INSERT_UPDATE)
    protected Long updatedBy;

    @TableField(exist = false)
    private LinkedList<TemplateDeviceUploadDataConfig> templateDeviceUploadDataConfigList;

    /**
     * 协议id
     */
    @TableField(value = "protocol_id", condition = EQUAL)
    private Long protocolId;
    /**
     * 报文类型-预定义的报文类型;#{HEART:00,注册/心跳;UOPLOAD:10,上传数据;CONTROL:30,控制;OTHERS:90,其他}
     */
    @TableField(value = "message_type", condition = EQUAL)
    private String messageType;
    /**
     * 报文代码
     */
    @TableField(value = "message_code", condition = LIKE)
    private String messageCode;
    /**
     * 报文返回的内容 支持thymleaf模版语言
     */
    @TableField(value = "message_rtn_message", condition = LIKE)
    private String messageRtnMessage;



}
